<%--
/**
* Copyright (c) 2000-2010 OSSR!ORG All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
--%>

<%@page import="javax.portlet.PortletRequest"%>
<%@page import="com.liferay.util.portlet.PortletRequestUtil"%>
<%@ include file="/html/init.jsp"%>

<portlet:defineObjects />
<liferay-theme:defineObjects />

<% 
	String tabs1 = ParamUtil.getString(request, "tabs1", "Inbox");  
	String fromAction = request.getParameter("fromAction");
	PortletURL portletURL = renderResponse.createRenderURL();  
	portletURL.setWindowState(WindowState.NORMAL);  
	portletURL.setParameter("tabs1", tabs1);  
	String tabNames = "Inbox,Outbox,Trash,Settings";  

%>

<c:if test="<%= !themeDisplay.isSignedIn()%>">
	<div class="portlet-msg-alert">You need to be signed in to view this portlet</div>
</c:if>
<c:if test="<%= themeDisplay.isSignedIn()%>">

<liferay-ui:tabs names="<%= tabNames %>" url="<%= portletURL.toString() %>" />

<c:if test='<%= null != fromAction && fromAction.equalsIgnoreCase("cancel") %>'>
	<div class="portlet-msg-alert">New Message Canceled by User</div>
</c:if>

<c:if test='<%= tabs1.equals("Inbox") %>'> 
	<%@ include file="/html/pm/inbox.jsp" %>
</c:if>
<c:if test='<%= tabs1.equals("Outbox") %>'> 
	<%@ include file="/html/pm/outbox.jsp" %>
</c:if>
<c:if test='<%= tabs1.equals("Trash") %>'> 
	<%@ include file="/html/pm/trash.jsp" %>
</c:if>
<c:if test='<%= tabs1.equals("Settings") %>'> 
	<%@ include file="/html/pm/settings.jsp" %>
</c:if>

</c:if>
